export function getLocale() {
  let locale = localStorage.getItem('locale');
  if(!locale){
    let language = navigator.language;
    if(language&&language.indexOf('-')>=0){
      locale = language.split("-")[0];
    }else{
      locale = 'en';
    }
  }
  return locale;
}

export function setLocale(locale) {
  return localStorage.setItem('locale',locale);
}